package com.itheima.a_oop;

/**
 * 目标：对象的内存分配原理（多个变量指向同一对象）
 */
public class Demo04 {

    public static void main(String[] args) {
        //创建一个学生对象
        Student s1 = new Student();
        s1.name = "张三丰";

        Student s2 = s1;
        s2.name = "李四海";

        System.out.println(s1.name);
    }
}
